package com.jmu.edu.IMApplication.utils;

import android.app.Notification;
import android.app.NotificationManager;
import android.content.Context;

import androidx.core.app.NotificationCompat;

import com.jmu.edu.IMApplication.R;

import static android.content.Context.NOTIFICATION_SERVICE;

public class NotificationUtils {

    public static NotificationManager getNotificationManager(Context context)
    {
        NotificationManager notifyManager=(NotificationManager)context.getSystemService(NOTIFICATION_SERVICE);
        return notifyManager;
    }

    public static NotificationCompat.Builder getBuilder(Context context)
    {
        NotificationCompat.Builder builder = new NotificationCompat.Builder(context,"CHANNEL_ID")
                .setSmallIcon(R.drawable.message)
                .setAutoCancel(true)
                .setDefaults(NotificationCompat.DEFAULT_ALL)
                .setPriority(Notification.PRIORITY_HIGH)
                .setVisibility(NotificationCompat.VISIBILITY_PUBLIC);
        return builder;
    }
}
